package 测试类;

import java.util.Scanner;

public class test6 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		char[] ch  = str.toCharArray();
		double res = 1;
		double res2 = 1;
		double count = 0;
		int length = 0;
		for (int i = 0; i < ch.length; i++) {
			if (ch[i] == '-'){
				res += 0.5;
			}
			if(i == ch.length-1){
				if((int)ch[i] % 2 == 0){
					res2 += 1;
				}
 			}
			if (ch[i] == '2'){
				count++;
			}
		}
		if (ch[0] == '-'){
			length = ch.length-1;
		}else{
			length = ch.length;
		}
		System.out.printf("%.2f",count/length*res*res2*100);
		System.out.println("%");
	}
}
